package com.spring.demo.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.spring.demo.AbstractService;
import com.spring.demo.dao.IBookDao;
import com.spring.demo.pojo.Book;
import com.spring.demo.service.IBookService;

/**
 *
 * @author nickel
 * @date 2019-01-25 09:18:01
 */
@Service
public class BookService extends AbstractService implements IBookService {

	@Autowired
	private IBookDao bookDao;

	@Override
	public boolean save(Book book) {
		log.info("save Book with service");
		bookDao.insert(book);
		return true;
	}

	@Override
	public List<Book> list() {
		log.info("list Books with service");
		return bookDao.getAll();
	}

}
